package org.mvn_spring_jsf_jar.model;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

import org.mvn_spring_jsf_jar.common.BaseModel;

@Entity
@SuppressWarnings("serial")
public class PagoServicio extends BaseModel {

	@Id
	@SequenceGenerator(name = "id", sequenceName = "PagoServicioSEQ")
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "id")
	@Column(unique = true)
	private Long id;

	@Column(precision = 20, scale = 2, nullable = false)
	private BigDecimal monto;

	@Basic(optional = false)
	private Date fecha;

	@ManyToOne(optional = false)
	@JoinColumn(name = "clienteID", nullable = false)
	private Cliente cliente;

	@Column(length = 150)
	private String comentario;

	public PagoServicio(Long id, BigDecimal monto, Date fecha, Cliente cliente,
			String comentario) {
		this.id = id;
		this.monto = monto;
		this.fecha = fecha;
		this.cliente = cliente;
		this.comentario = comentario;
	}

	public PagoServicio() {
		this(null, null, null, null, null);
	}

	public Long getID() {
		return id;
	}

	public void setID(Long id) {
		this.id = id;
	}

	public BigDecimal getMonto() {
		return monto;
	}

	public void setMonto(BigDecimal monto) {
		this.monto = monto;
	}

	public Date getFecha() {
		return fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	public Cliente getCliente() {
		return cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

	public String getComentario() {
		return comentario;
	}

	public void setComentario(String comentario) {
		this.comentario = comentario;
	}
}
